﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.OracleClient;
using BCNPCObject.DB;
using DbLinq;
using DbLinq.Oracle;
using CMISLibrary.Entities;
using CMISLibrary;

namespace BCNPCObject
{
    public class cls_NPC_BCTTTT_Controller
    {
        #region   Atributes

        private DataSet CMIS_Header = new CMISOutputParameter();
        private DataSet ds = new DataSet();
        private DataTable dt = new DataTable();
        private NPC_BCTTTT info;

        #endregion

        #region   Constructor

        public cls_NPC_BCTTTT_Controller()
        {
            info = new NPC_BCTTTT();
        }
        public cls_NPC_BCTTTT_Controller(NPC_BCTTTT Info)
        {
            this.info = Info;
        }

        #endregion

        #region   Properties

        public NPC_BCTTTT pInfor
        {
            get { return info; }
            set { info = value; }
        }

        #endregion

        #region  DungNT NPC
       
        public IEnumerable<NPC_BCTTTT> Get_BCTTTT(string p_madonvi,Int16 p_thang,Int16 p_nam,string p_nhapth)
        {
            //DataSet ds = new DataSet();
            //DataTable dt = new DataTable();
            try
            {
                var q = from p in CMIS2.DB.NPC_BCTTTT
                        where p.MA_DVIQLY == p_madonvi
                        && p.THANG == p_thang && p.NAM == p_nam
                        && p.NHAP_THOP == p_nhapth
                        select p;
                   
                return q;
            }
            catch
            {
                CMIS2.ResetDB();
                return null;
            }
        }
        
        #endregion
    }


}
